import 'package:json_annotation/json_annotation.dart';

@JsonSerializable()
class BuildInJsonConverterBean {
  int intA = 1;
  bool boolB = false;
  List<bool>? b2;
  List<bool?>? b3;

  String stringC = '1';
  double doubleD = 0.0;
  DateTime? dateTime;
  List<DateTime>? dateTime2;
  Map? map;
}

DateTime? defaultDateTimeFromJson(dynamic v) {
  final millisecondsSinceEpoch = int.parse(v.toString());
  return DateTime.fromMillisecondsSinceEpoch(millisecondsSinceEpoch);
}

dynamic defaultDateTimeToJson(DateTime? v) {
  return v?.millisecondsSinceEpoch;
}
